package com.blt.car.me;

import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.blt.car.R;
import com.blt.car.base.BaseTitleBarActivity;
import com.blt.car.base.ViewHolder;

/**
 * Created by xgp on 2017/6/20.
 */

public class UserGuideActivity extends BaseTitleBarActivity {

    private int activity;
    private TextView container;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_user_guide;
    }

    @Override
    protected void initData() {
        super.initData();
        activity = getIntent().getExtras().getInt(SettingActivity.OPEN_ACTIVITY_TYPE);
    }


    @Override
    protected void initView(ViewHolder holder) {
        container = holder.get(R.id.comm_container);
        RelativeLayout shareLayout = holder.get(R.id.com_share_layout);
        if (activity == SettingActivity.USER_GUIDE) {
            mTitleBar.setTitle("使用指南");
            container.setText("使用说明页面");
        } else if (activity == SettingActivity.INVITE_FRIEND) {
            mTitleBar.setTitle("邀请好友");
            container.setVisibility(View.GONE);
            shareLayout.setVisibility(View.VISIBLE);
        } else if (activity == SettingActivity.ABOUT_US) {
            mTitleBar.setTitle("关于我们");
            container.setText("关于我们");
        }
    }
}
